package districting;

public class ShortestBisectingLineMethod {
   private Nation nation;

   public ShortestBisectingLineMethod(Nation nation) {
      this.nation = nation;
   }

   public void allocateDivisions() {
      for (State state : nation.getStates()) {
         allocateDivisions(state);
      }
   }

   public void allocateDivisions(State onlyThisState) {
      ShortestBisectingLineRegion region = new ShortestBisectingLineRegion(onlyThisState.getNumDivisions());
      region.createFromState(onlyThisState);
      region.bisectRegion();
   }

}
